/*
----------------------------------------------------------------------------------------------------
This source file is part of the Gamut Framework
Copyright (c) 2007 by Ryan Holcombe

This program is free software; you can redistribute it and/or modify it under the terms of the GNU
Lesser General Public License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
----------------------------------------------------------------------------------------------------
*/


#ifndef _IState_h_
#define _IState_h_


namespace Gamut
{

	/**
 		Interface state class, all states are derived from here
	*/

	class IState
	{
	private:

	public:
		/**
			\brief initialises the object when it is added to the State Manager [pure virtual]
			\return 0 if an error occurs
		*/
		virtual bool onStateAdd() = 0;
	
	
		/**
			\brief cleans up the state on shutdown [pure virtual]
		*/
		virtual void onStateDestroy() = 0;
		
		
		/**
			\brief runs any necessary functions when the state is pushed [pure virtual]
		*/
		virtual bool onStatePush() = 0;
		
		
		/**
			\brief runs any necessary functions when the state is popped [pure virtual]
		*/
		virtual void onStatePop() = 0;
		
		
		/**
			\brief this is run each frame by the State Manager [pure virtual]
			\param[in] elapsed time in seconds since the last frame
			\return 0 to unload the state from the manager
		*/
		virtual bool tickState(double elapsed) = 0;
		
		
		/**
			\brief this is run if the state is not on top of the stack [pure virtual]
			\param[in] elapsed time in seconds since the last frame
			\return 0 to unload the state from the manager
		*/		
		virtual bool pauseState(double elapsed) = 0;
	};
	
}


#endif
